package com.cr.business.domain.dto.app;

import com.cr.common.constant.RegConstants;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class UpdatePasswordDto {

    /**
     * 用户ID
     */
    private String userId;

    /**
     * 原密码
     */
    @NotBlank(message = "原密码不能为空")
    private String oldPassword;

    /**
     * 新密码
     */
    @NotBlank(message = "新密码不能为空")
    @Pattern(regexp = RegConstants.PASSWORD, message = "新密码格式有误！")
    private String password;

    /**
     * 确认密码
     */
    @NotBlank(message = "确认密码不能为空")
    @Pattern(regexp = RegConstants.PASSWORD, message = "确认密码格式有误！")
    private String comfirmPassword;

}
